//
//  GKDYPlayerManager.h
//  GKDYVideo
//
//  Created by QuintGao on 2023/3/17.
//  Copyright © 2023 QuintGao. All rights reserved.
//

#import <Foundation/Foundation.h>
#import "GKDYVideoScrollView.h"
#import "GKDYVideoPortraitView.h"
#import "GKDYPlayerViewController.h"

NS_ASSUME_NONNULL_BEGIN

@class GKDYVideoCell, GKDYVideoPortraitCell;

@protocol GKDYPlayerManagerDelegate <NSObject>
- (void)cellDidScroll2Video:(WSVideo *)model;

- (void)cellDidClickLike:(WSVideo *)model;
- (void)cellDidClickChapter:(WSVideo *)model;
@end

@interface GKDYPlayerManager : NSObject
@property (nonatomic, weak) id<GKDYPlayerManagerDelegate> delegate;
/// 竖屏滑動容器
@property (nonatomic, strong) GKDYVideoScrollView *scrollView;
/// 横屏滑動容器
@property (nonatomic, strong, nullable) GKDYVideoScrollView *landscapeScrollView;
///当前正在播放的短剧
@property (nonatomic, weak) GKDYVideoPortraitCell *currentCell;
/// 竖屏控制层
@property (nonatomic, weak) GKDYVideoPortraitView *portraitView;
/// 数据源
@property (nonatomic, strong) NSMutableArray *dataSources;
@property (nonatomic, assign) BOOL isPlaying;
@property (nonatomic, assign) BOOL isAppeared;
@property (nonatomic, assign) BOOL isPlayNext;

/// 播放视频
- (void)playVideoWithCell:(GKDYVideoCell *)cell index:(NSInteger)index;
/// 停止播放
- (void)stopPlayWithCell:(GKDYVideoCell *)cell index:(NSInteger)index;
///跳章
- (void)playVideoWithVideo:(id)object;
- (void)play;
- (void)pause;

@end

NS_ASSUME_NONNULL_END
